<%--
  Created by IntelliJ IDEA.
  User: ghost
  Date: 2020/1/8
  Time: 11:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head>
    <title>Title</title>
    <style>
        td{
            padding:10px;
        }
    </style>
</head>
<body>
<p><a href="addAdmit.jhtml">添加用户</a>&nbsp;<a href="toProjectAdd.jhtml">添加项目</a></p>
<form method="post" action="search.jhtml">
<p><input type="text" name="name" placeholder="姓名" value="${name}">
    <input type="date" name="startDate" value="${start}">
    --><input type="date" name="endDate" value="${end}">
<input type="submit" value="search">
</p>
</form>
<table border="1" cellpadding="0" cellspacing="0">
<tr><td>ID</td><td>姓名</td><td>电话号码</td><td>单位</td><td>位置</td><td>入职日期</td><td>操作</td></tr>
<c:forEach items="${p.data}" var="u">
    <tr>
        <td>${u.id}</td>
        <td>${u.name}</td>
        <td>${u.telephone}</td>
        <td>${u.unit}</td>
        <td>${u.landMark}</td>
        <td><fmt:formatDate value="${u.enterdate}" pattern="yyyy-MM-dd"/></td>
        <td><a href="toUser-udp-${u.id}.jhtml">修改</a>&nbsp;<a href="toUser-del-${u.id}.jhtml">删除</a></td>
    </tr>
</c:forEach>
</table>

<p>
    <c:if test="${p.page != 1}">
        <a href="search.jhtml?pageNO=1${url}">首页</a>
        <a href="search.jhtml?pageNO=${p.page-1}${url}">上一页</a>
    </c:if>
<input style="width: 20px;" type="text" value="${p.page}">/${p.totalPage}
    <c:if test="${p.page != p.totalPage}">
        <a href="search.jhtml?pageNO=${p.page+1}${url}">下一页</a>
        <a href="search.jhtml?pageNO=${p.totalPage}${url}">末页</a>
    </c:if>
</p>

</body>
</html>
